package com.server;

import cn.jpush.api.push.model.PushPayload;
import com.dto.JPushMsgDTO;
import com.dto.MsgDetailDocument;
import com.dto.MsgDetails;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
//import org.bson.types.ObjectId;

/**
 * Created by jeff on 2017/1/14.
 */

@Component
public interface IMsgService{

    public List<MsgDetails> findAll (Long userId, Integer channel);

    public List<MsgDetails> findByType(Long userId, String msgType, Integer channel);

    public MsgDetails  findOne(Long userId, String msgId, Integer channel);


    public Boolean updateAllToRead(Long userId, Integer channel);

    public Boolean updateAllToRead(Long userId, String msgType, Integer channel);

    public Boolean updateToReadById(Long userId,  String id, Integer channel);

    public Boolean deleteAll(Long userId, Integer channel);

    public Boolean deleteAll(Long userId, String msgType, Integer channel);

    public Boolean deleteById(Long userId,  String id, Integer channel);

    public Boolean saveMsg(JPushMsgDTO dto);

    public long countByStatus(Long userId, Integer status, Integer channel);

}
